package cn.lizemin.demo.thread.innerClass;

/**
 * @author: lizemin
 * @version: 1.0
 */
public class MyLifeImpl {
    //这是一个main方法,是程序的入口
    public static void main(String[] args) {
        MyLife myLife = new MyLife() {
            @Override
            public void eat() {
                System.out.println("就知道吃");
            }

            @Override
            public String work(String item) {
                return "好好工作";
            }
        };
        String aaa = myLife.work("aaa");
        System.out.println(aaa);
        myLife.eat();

    }

}
